Data duplication control method

ABSTRACT

In the present invention, when there is a change in a group of volumes managed by a host computer, data duplication processing is immediately carried out against the changed volume. The host computer  10  comprises a volume-managing portion(unit)  12 , a data duplication-controlling portion(unit)  11  which executes the data duplication of the data stored in the volume  32  in the main data center  3 , and a data duplication storing portion(unit)  13  which stores data necessary for the data duplication. The data duplication-controlling portion  11  compares data held by the volume-managing portion  12  and the data in the data duplication storing portion  13 , and updates the data in the data duplication storing portion  13  based on the data held by the volume-managing portion  12.

BACKGROUND OF THE INVENTION

The present invention relates to a technique of data duplication controlin a computer system.

It is a matter of course that as for a public or corporateinfrastructure system, being responsible for social infrastructure, ahigh availability is pursued. In particular, nowadays, it is necessaryto devise a countermeasure as to recovery works (disaster recovery) ofthe system after the event of disaster. In this regard, data stored in amain data center (site) is copied in a storage device at a sub datacenter as data backup. With this configuration, it is possible tocontinue operations even in disaster situations, by use of the datacopied in the storage at the sub data center.

For example, Japanese Patent Laid-open Publication No. 2001-318833(hereinafter, referred to as “Patent Document 1”) discloses a storagesubsystem having a volume copying function to copy data by volume. Here,the “volume” indicates a logical unit to manage a storage medium (forexample, a magnetic disk and the like) for storing data.

In Japanese Patent Laid-open Publication No. 2003-122509 (hereinafter,referred to as “Patent Document 2”) there is disclosed a disasterrecovery system which performs data transfer among three data centers.This disaster discovery system holds data in each of the three datacenters, thereby reducing data loss, as well as it maintains aconfiguration being prepared for disaster recovery, even after one datacenter is lost in the event of a disaster. Here, the “data loss”indicates that if a transfer delay occurs due to a long distance betweenthe data centers and a disaster occurs during the delay time, data thatis to be transferred during that time will be lost.

SUMMARY OF THE INVENTION

Usually, data duplication is carried out by selecting a volume where thedata that is required to be duplicated is stored, and by copying thedata in units of volume. Therefore, a host computer responsible forbusiness processing holds information of a volume which stores importantinformation in the business processing, i.e., a volume required to beduplicated.

When a volume to be used is added due to increase of data for executingbusiness processing, it is also necessary to duplicate thus addedvolume. In order to keep consistency between data, the copying sequenceshould be assured when data is copied. Therefore, it is required thatthe volume newly added is immediately duplicated. However, in aconventional system, timing for such volume addition has not been takeninto account.

Furthermore, in the Patent Document 1, there is described that asecondary volume as a data copying destination is allocated (selected)within one disk subsystem. However, there is no consideration regardinga case that which subsystem is to be selected if multiple disksubsystems exist. Further in the Patent Document 1, the data duplicationwithin a multistage data center configuration (among at least three datacenters) as described in the Patent Document 2 is not considered either.

The present invention has been made in view of the above situations, anda feature of the present invention is as the following: if there is achange in a group of volumes that are managed by a host computer, dataduplication processing is immediately executed against the volume havingbeen changed.

In order to solve the above problems, in the present invention, volumeinformation managed by the host computer and duplication definitioninformation for carrying out the data duplication are compared, and theduplication definition information is updated based on a result of thecomparison.

For example, the present invention comprises,

-   -   an identification information reading step which reads out from        a storing portion(unit) an identification information list in        which identification information of each of a plurality of        storage media included in the storage subsystem is stored,    -   a first reading step which reads out from the storing portion a        first duplication definition information which stores the        identification information with respect to each of the plurality        of storage media, and identification information of a copy        destination storage medium of each of the plurality of storage        media, and    -   a first comparing step which compares the identification        information list read out in the identification information        reading step, and the first duplication definition information        read out in the first reading step.

The present invention further comprises,

-   -   an addition step in which if there exists identification        information that is stored in the identification information        list but not stored in the first duplication definition        information in the first comparing step, a copy destination        recording medium of the storage medium having the identification        information is selected according to a predetermined selection        condition, the identification information and the identification        information of the copy destination storage medium thus selected        are added to the first duplication definition information, and        data in the storage medium having the identification information        is copied to the copy destination storage medium thus selected,        and    -   a deletion step in which if there exists identification        information that is not stored in the identification information        list but is stored in the first duplication definition        information in the first comparing step, the identification        information and the identification information of the storage        medium, which is a copy destination of the storage medium having        the identification information, are deleted from the first        duplication definition information, and copying the data of the        storage medium having the identification information is stopped.

According to the present invention, if there is a change in a group ofvolumes that are managed by the host computer, data duplicationprocessing is immediately executed against the volume having beenchanged.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic diagram showing a computer system to which one ofthe embodiments of the present invention is applied.

FIG. 2 is a diagram showing an example of a hardware configuration ofthe computer system.

FIG. 3 is a diagram showing an example of data structure of dataduplication configuration-storing portion(unit).

FIG. 4 is a diagram showing an example of data structure of copy groupdefinition data.

FIG. 5 is a diagram showing an example of data structure of copy grouprelation definition data.

FIG. 6 is a diagram showing an example of data structure of duplicationcondition data.

FIG. 7 is a diagram showing an example of data structure of disksubsystem configuration data.

FIG. 8 is a diagram showing a flowchart of processing in the dataduplication-controlling portion(unit).

FIG. 9 is a diagram showing a flowchart of volume addition processing inthe data duplication-controlling portion(unit).

FIG. 10 is a diagram showing a flowchart of volume deletion processingin the data duplication-controlling portion(unit).

FIG. 11 is a schematic diagram showing a computer system to whichprovides a management computer.

FIG. 12 is a diagram showing an example of GUI to which the hostcomputer system 1 or the management computer has.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Preferred embodiments of the present invention will be explained as thefollowing.

In the data duplication processing of the present embodiment, a volumeor copy source is referred to as “a primary volume”, and a volume ofcopy destination is referred to as “a secondary volume”. A pair of the“primary volume and the “secondary volume” is referred to as “a pair”.Here, it is assumed that in the data duplication processing, there are asynchronous remote copy and an asynchronous remote copy as described inthe Patent Document 2. Specifically, the synchronous remote copy is amethod as the following: When an update instruction (writinginstruction) is issued to the primary volume from a host computer andthe like, copying to the secondary volume is continuously carried out insync with the update instruction. On the other hand, the asynchronousremote copy is as the following: When an update instruction (writinginstruction) is issued to the primary volume from a host computer andthe like, copying to the secondary volume is carried out at irregularintervals irrespective of the update instruction.

As for a method for selecting a secondary volume within a predetermineddisk subsystem, the method described in the patent document 1 will beused. That is, according to a secondary volume selection instructionfrom the host computer, the disk subsystem selects a volume, not in useand having larger disk volume than that of the primary volume, withinthe disk subsystem, and notifies the host computer of thus selectedvolume.

FIG. 1 is a schematic diagram of a computer system to which oneembodiment of the present invention has been applied. This systemcomprises a host computer system 1, disk subsystem 30 of a main datacenter 3, a disk subsystem 40 of a local data center 4, and a disksubsystem 50 of a remote data center 5. The main data center 3, thelocal data center 4, and the remote data center 5 respectively include aplurality of disk subsystems 30, disk subsystems 40, and disk subsystems50.

Here, it is assumed that the data duplication processing between themain data center 3 and the local data center 4 is based on thesynchronous remote copy, and the data duplication processing between thelocal data center 4 and the remote data center 5 is based on theasynchronous remote copy. It is further assumed that each of theconnection between the main data center 3 and the local data center 4,and the connection between the local data center 4 and the remote datacenter 5 is established via a network 2 such as intranet.

In the present embodiment, as for these data centers 3 to 5, each of thedisk subsystems 30, 40 and 50, respectively of the main data center 3,the local data center 4, and the remote data center 5 are seriallyconnected, setting the host computer system 1 as a base point. In otherwords, firstly, the volume 32 of the main data center 3 is defined as aprimary volume that is a copy source, and the volume 42 of the localdata center 4 is defined as a secondary volume, so that those twovolumes are defined as a first pair. Furthermore, the volume 42 of thelocal data center 4 is defined as a primary volume and the volume 52 ofthe remote data center 5 is defined as a secondary volume, so that thosetwo volumes are defined as a second pair. With this configuration, it ispossible to make a copy of the volume 32 of the main data center 3 inthe remote data center 5.

It is to be noted that each of the volumes in the first pair where thevolume 32 of the main data center 3 is defined as a primary volume andthe second pair where the volume 42 of the local data center 4 isdefined as a primary volume, are collectively referred to as a volumeimage set 6.

In the present embodiment, the data centers are in three stages, i.e.,the main data center 3, the local data center 4 and the remote datacenter 5. However, the present invention is not limited to thisconfiguration, and data centers in two stages or four or more stages maybe applicable.

The host computer system 1 comprises a host computer 10 and a hostcomputer SVP (Service Processor) 20. The host computer 10 is ageneral-purpose computer unit which executes various data processingprocedures (so-called business processing). The host computer 10comprises a data duplication-controlling portion(unit) 11, avolume-managing portion(unit) 12, a data duplicationconfiguration-storing portion(unit) 13, an I/O configuration-storingportion(unit) 14, and an input-output portion(unit) 15.

The data duplication-controlling portion 11 controls so-called dataduplication processing, in which a copy is made by volume as to the datastored in the disk subsystem 30 of the main data center 3, to the disksubsystems 40, 50 of the local data center 4 and the remote data center5.

The volume-managing portion 12 serves as a function of the operatingsystem (referred to as “OS” in the following), which is not illustrated,and provides an application program (business processing program) withthe volumes in the disk subsystems collectively as one virtual volumegroup. Furthermore, the volume-managing portion 12 manages this virtualvolume group, and outputs management information of the volumes (forexample, a list of VOLSER) included in the volume group. The “VOLSER”represents “volume serial number” that is allocated to identifyindividual volumes. It is assumed in the present embodiment that thevolume-managing portion 12 has one volume group.

The data duplication configuration-storing portion 13 stores informationnecessary for the data duplication-controlling portion 11 to execute thedata duplication processing, and this will be explained below withreference to FIG. 3 to FIG. 7.

The I/O configuration-storing portion 14 stores configurationinformation of various I/O devices including the disk subsystemsconnected to the host computer 10. When the host computer 10 is startedup, the OS expands on a memory (main memory) the information stored inthe I/O configuration-storing portion 14.

The input-output portion 15 carries out data transfer between thevarious I/O devices including the disk subsystem and the memory, basedon the information stored in the I/O configuration-storing portion 14.The CPU in the host computer 10 accesses the disk subsystem via theinput-output portion 15, and refers to and updates data. The hostcomputer SVP 20 is a sub processor to monitor or operate the hostcomputer 10, and it is used as a console.

The main data center 3 comprises a plurality of subsystems 30 which areconnected to the host computer 10. Each of the disk subsystems 30includes a disk controller 31, a plurality of volumes 32, and a disksubsystem SVP 33. The disk controller 31 controls the volume 32, such asdata input and output, based on an instruction from the host computer10. It is to be noted that the disk controller 31 also executes aprocess for selecting a secondary volume as described in the PatentDocument 1. In other words, according to the instruction from the hostcomputer 10 to select a secondary volume, the disk controller 31 selectsa volume within the disk subsystem, not in use and having larger diskvolume than that of the primary volume, and notifies the host computerof thus selected volume.

The volume 32 is storage medium for storing data, such as magnetic disk,and it is a logical unit to manage the storage medium. Therefore, aplurality of physical magnetic disks may be stored in one volume 32, orit is possible to define a plurality of magnetic disks as one volume.The disk subsystem SVP 33 is a sub processor to monitor or operate thedisk controller 31 and a plurality of volumes 32.

The local data center 4 and the remote data center 5 respectively have aplurality of disk subsystems 40, 50. The plurality of disk subsystems40, 50 have similar configuration as that of the disk subsystems 30 inthe main data center 3.

As the host computer 10 described above, it is possible to use ageneral-purpose computer system which comprises, as shown in FIG. 2 forexample, a CPU 901, a memory 902, an external storage unit 903 such asmagnetic disk, an input unit 904 such as a keyboard and mouse, an outputunit 905 such as a monitor and printer, a communication control unit 906to establish a connection with a network, and a bus 907 for connectingthe each of the above units.

In this computer system, when the CPU 901 executes a predefined programof the host computer 10, which is loaded on the memory 902, eachfunction of the host computer 10 is implemented. In this case, thememory 902 or the external storage unit 903 is utilized as the dataduplication configuration-storing portion 13 and the I/Oconfiguration-storing portion 14. The disk subsystem 30 of the main datacenter 3 is also used as the external storage unit 903. The hostcomputer SVP 20 is utilized as the input unit 904 or output unit 905.

It is to be noted that a general-purpose computer system as shown inFIG. 2 can also be used for the host computer SVP 20, the disk subsystemSVPs 33, 43, 53 and the disk controllers 31, 41, 51.

Next, the data duplication configuration-storing portion 13 of hostcomputer 10 will be explained.

FIG. 3 shows information items stored in the data duplicationconfiguration-storing portion 13. The data duplicationconfiguration-storing portion 13 comprises copy group definition data16, copy group relation definition data 17, duplication condition data18 and disk subsystem configuration data 19.

FIG. 4 shows an example of data structure of the copy group definitiondata 16. The “copy group” represents a collection of pairs of theprimary volume (copy source) and the secondary volume (copy destination)in the data duplication processing. In the present embodiment, there aregenerated two copy groups, i.e., a copy group between the main datacenter 3 and the local data center 4, and a copy group between the localdata center 4 and the remote data center 5. If another copy group existsas a target of the data duplication processing, such as the case wherethe data duplication is carried out in a data center besides the abovethree data centers, the copy group definition data 16 is furthergenerated for the additional copy group.

The copy group definition data 16 includes a copy group number 161, atransfer type identifier 162, a volume group identifier 163, a primaryvolume data center identifier 164, a secondary volume data centeridentifier 165, a related/non-related flag 166, and at least one pairdata 167.

The copy group number 161 is a number to identify a copy group. The copygroup number 161 may be a unique number inputted by a user from theinput unit 904. Alternatively, it may be a number obtained by automaticnumbering by the data duplication-controlling portion 11. The transfertype identifier 162 is to identify the transfer type, synchronous orasynchronous. The volume group identifier 163 is to identify a virtualvolume group managed by the volume-managing portion 12.

The primary volume data center identifier 164 is to identify the datacenter, in which the primary volume (copy source) of the pair includedin the copy group exists. The secondary volume data center identifier165 is to identify the data center in which the secondary volume (copydestination) of the pair included in the copy group exists. It is to benoted as the data center identifiers 164, 165, for example, the maindata center 3 may be represented by “main”, the local data center 4 maybe represented by “local”, and the remote data center 5 may berepresented by “remote”. The related/non-related flag 166 is a flagwhich indicates whether or not a copy group exists, which defines thesecondary volume of the pair included in the copy group as a primaryvolume. That is, it is a flag to identify an existence of a copy groupwhich forms a volume image set 6 together with the present copy group.

The pair data 167 is to identify a primary volume (copy source) and asecondary volume (copy destination) which constitute a pair, and thepair data is configured by pairings the primary volume and the secondaryvolume. Furthermore, if there are a plurality of pairs within one copygroup, a plurality of pair data items 167 are made corresponding to thenumber of pairs existing in the copy group.

In other words, as shown in FIG. 4, the pair data 167 comprises asinformation of the primary volume (copy source), a primary volume number1671, a primary disk subsystem number 1672, and a primary VOLSER 1673.Similarly, the pair data 167 as information of the secondary volume(copy destination), a secondary volume number 1674, a secondary disksubsystem number 1675, and a secondary VOLSER 1676.

The volume numbers (primary and secondary) 1671, 1674 are unique numberswhich identify the volumes uniquely within the disk subsystem.Furthermore, the disk subsystem numbers (primary and secondary) 1672,1675 are unique numbers which identity uniquely a plurality of disksubsystems existing in the data center. The VOLSERs (primary andsecondary) 1673, 1676 are serial volume numbers for the volume-managingportion 12 of the host computer 10 to manage each volume. It is to benoted that the volumes 42, 52 of the local data center 4 and the remotedata center 5 may not be managed by the volume-managing portion 12. Inthis case, the VOLSERs 1673, 1676 of the volumes 42, 52 respectivelyincluded in the local data center 4 and the remote data center 5 becomespace (empty data).

Next, the copy group relation definition data 17 will be explained. Thecopy group relation definition data 17 establishes relations among aplurality of copy groups that are defined in the copy group definitiondata 16. Accordingly, the volume image set 6 can be defined.

FIG. 5 shows an example of data structure of the copy group relationdefinition data 17. The copy group relation definition data 17 comprisesthe first copy group number 171 and the second copy group number 172. Inthe first copy group number 171, there is stored a copy group number 161of the copy group definition data 16 where an identifier of the maindata center 3 is stored in the primary volume data center identifier164. In the second copy group number 172, there is stored another copygroup number 161 of the copy group definition data 16. The copy groupdefinition data 16 indicated by the another copy group number includesidentification information items 1671 to 1673 regarding the primaryvolume (copy source) stored in each pair data 167, which respectivelycorrespond to identification information items 1674 to 1676 regardingthe secondary volume (copy destination) stored in each pair data 167 ofthe copy group definition data 16, the copy group number of which isstored in the first copy group number 171.

In other words, the secondary volume information items 1674 to 1676 ofeach pair data 167 included in the copy group definition data 16 of thefirst copy group number 171 are respectively equal to the primary volumeinformation items 1671 to 1673 of each pair data 167 included in thecopy group definition data 16 having the second copy group number 172.As thus described, related copy group number 161 is stored in each ofthe first copy group number 171 and the second copy group number 172,whereby a volume image set 6 can be defined by establishing a relationbetween two copy groups.

In the present embodiment, since the data centers are in three stages,the copy group relation definition data 17 includes the first and thesecond copy group numbers 171, 172. However, if the data centers are infour stages, the copy group relation definition data 17 may furtherinclude a third copy group number in addition to the first and thesecond copy group numbers 171, 172.

Next, the duplication condition data 18 will be explained. Theduplication condition data 18 stores a condition for selecting a disksubsystem of the copy destination or the copy source, when a pair ismade (i.e., a pair is made between the primary volume of copy source andthe secondary volume of copy destination). It is to be noted that theduplication condition data 18 is used in volume addition processing (seeFIG. 9) in the data duplication-controlling portion 11, as describedbelow.

FIG. 6 shows an example of table which represents the duplicationcondition data 18. The duplication condition data 18 comprises aselection condition 181, in which a selection condition used when thedata duplication-controlling portion 11 selects a disk subsystem isdescribed, and a temporary condition flag 182 which indicates whether ornot the selection condition 181 is temporarily used only in the presentvolume addition processing.

The selection condition 181 includes two types, i.e., a permanent(general) selection conditions 103, 184, which are previously inputtedby a user from the input unit 904, and a temporary selection condition185 temporarily generated by the data duplication-controlling portion 11in the volume addition processing. The permanent selection conditions183, 184 include a condition necessary for volume management andoperations, a restriction in a hardware specification or a restrictionin the data duplication-controlling portion 11, and the conditions areto be used in all volume addition processing. For example, among theselection conditions as shown in Fig. 6, in the permanent selectionconditions 183, 184, there are described selection conditions in thecase of asynchronous remote copy (data duplication between the localcenter 4 and the remote data center 5). As for the temporary selectioncondition 185, it is generated when the data duplication-controllingportion 11 executes the volume addition processing, and it is aselection condition used only in the present processing. This temporaryselection condition is deleted at the time when the present processingis completed.

The temporary condition flag 182 is a flag to identify whether theselection 181 is permanent or temporary. In the present embodiment, thetemporary condition flag 102 being “OFF” indicates permanent selectionconditions 183, 184. Alternatively, the temporary condition flag 182being “ON” indicates a temporary selection condition 185.

Next, the disk subsystem configuration data 19 will be explained. Thedisk subsystem configuration data 19 stores a configuration of the disksubsystem and volume which are target of data duplication processing inthe host computer 10.

FIG. 7 shows an example of data structure of the disk subsystemconfiguration data 19. As illustrated, the disk subsystem configurationdata 19 stores by data center, a data center identifier 191, a disksubsystem number 192, an unused volume number 193, a volume number 194,and VOLSER 195. The unused volume number 193 stores the number orvolumes which are unused (blank) within the disk subsystem. This unusedvolume number 193 initially stores the number of all volumes included inthe disk subsystem. When the data duplication-controlling portion 11uses the unused volume, for the volume addition processing and the like(see FIG. 9), the number of volumes thus used is subtracted form theunused volume number 193. In other words, the disk subsystem where theunused volume number 193 is “0”, it indicates that there is no unusedvolume.

In the example as shown in FIG. 7, the main data center 3 whose datacenter identifier 191 is “main” includes two disk subsystems, the disksubsystem numbers 192 of which are respectively “1” and “2”. The disksubsystem whose disk subsystem number 192 is “1” includes three volumesthe volume numbers 194 of which are “00”, “01”, and “02”, respectively.The VOLSER 195 of each volume is “VOL010”, “VOL001”, and “VOL005”. Sincethe unused volume 193 is “0”, there is no volume that is unused, as forthose volumes.

Furthermore, the local data center 4 whose data center identifier 191 is“local” includes a disk subsystem having “5” as the disk subsystemnumber 192, and this disk subsystem includes a volume whose volumenumber 194 is “00”. Since this volume is not managed by thevolume-managing portion 12, the VOLSER 195 is blank (space).Furthermore, the remote data center 5 whose data center identifier 191is “remote” includes a disk subsystem whose disk subsystem number 192 is“8”, and this disk subsystem includes a volume whose volume number 194is “00”. The VOLSER 195 of this volume is also blank (space).

Next, a flow of processing in the data duplication-controlling portion11 will be explained following the flowchart as shown in FIG. 8.

The data duplication-controlling portion 11 executes the dataduplication processing periodically, every constant time period or cycle(for example, once a day, once a week, and the like). Alternatively, thedata duplication-controlling portion 11 receives a user instruction fromthe input unit 904, and executes the data duplication processing. Whenthere is a change in a volume group managed by the volume-managingportion 12, the volume-managing portion 12 instructs the dataduplication-controlling portion 11 to execute the data duplicationprocessing. Then, the data duplication-controlling portion 11 receivesthis execution instruction, and executes the data duplicationprocessing.

firstly, the data duplication-controlling portion 11 reads out the copygroup relation definition data 17 from the data duplicationconfiguration-storing portion 13, and obtains the first copy groupnumber 171 (S801). Then, the data duplication-controlling portion 11reads out from the data duplication configuration-storing portion 13,the copy group definition data 16 having the copy group number thusobtained, and further obtains a volume group identifier 163 of the copygroup definition data 16 thus road out (S802).

Next, the data duplication-controlling portion 11 obtains from thevolume-managing portion 12, a VOLSER list of the volume group identifier163 thus obtained (S803). The VOLSER list is a list which thevolume-managing portion 12 holds by volume group, and it is a catalogueof VOLSERs of the volumes included in each volume group.

Then, the data duplication-controlling portion 11 compares the VOLSERregistered in the VOLSER list obtained in S803, and primary VOLSER 1673of each pair data 167 included in the copy group definition data 16which is read out in S802 (S804). Then, the data duplication-controllingportion 11 determines whether or not there exists a volume as to whichthe data volume addition processing is to be executed (S805). In otherwords, the data duplication-controlling portion 11 determines whether ornot all the VOLSERs stored in the VOLSER list are stored in the primaryVOLSER 1673 of the pair data 167.

If there is a VOLSER that is included in the VOLSER list, but not storedin any of the primary VOLSER 1673 of the pair data 167 (S805: YES), itindicates that a volume to be used in the business processing in thehost computer 10 is added, but a data duplication processing has notbeen carried out yet against thus added volume. Therefore, the dataduplication-controlling portion 11 executes a process for adding avolume of the pertinent VOLSER to the copy group definition data 16(S806). This volume addition processing (S806) will be described belowwith reference to FIG. 9.

On the other hand, all the VOLSERs included in the VOLSER list arerespectively stored in any of the primary VOLSER 1673 of the pair data167 (S805: NO), the data duplication-controlling portion 11 determineswhether or not there is a volume to be deleted from the copy groupdefinition data 16 (S807) In other words, if there is a VOLSER which isstored in the primary VOLSER 1673 of the pair data 167, and not storedin the VOLSER list (S807; YES), it indicates that the data duplicationprocessing is performed against a volume which becomes unnecessary inthe business processing. Therefore, the data duplication-controllingportion 11 carries out a process for deleting the pair data 167 havingthe volume of the pertinent VOLSER, from the copy group definition data16 (S808). This volume deletion processing (S808) will be described withreference to FIG. 10.

On the other hand, if all the VOLSERs stored in the primary VOLSER 1673of the pair data 167 are stored in the VOLSER list (S807: NO), VOLSERsin the VOLSER list and the primary VOLSERs 1673 of the pair data 167held by the copy group definition data 16 are respectively identical toeach other. Therefore, the data duplication-controlling portion 11completes the data duplication-control processing, without executing thevolume addition processing (S8O6) or the volume deletion processing(S808).

Then, the data duplication-controlling portion 11 is in a state of“WAIT”, until the next start-up timing (for example, at the nextstart-up cycle, upon receipt of execution instruction from a user or thevolume-managing portion 12, and the like).

Next, a flow of the aforementioned volume addition processing (S806)will be explained following the flowchart as shown in FIG. 9.

At first, the data duplication-controlling portion 11 reserves a regionin the data duplication configuration-storing portion 13, for adding thepair data 167 in the copy group definition data 16, which is a targetfor processing. Then, primary volume information (copy source) of thusadded pair data 167 is set (S901). In other words, the dataduplication-controlling portion 11 sets in the primary VOLSER 1673, aVOLSER that is determined to be added in S806. Then, the dataduplication-controlling portion 11 reads out the disk subsystemconfiguration data 19, and obtains a volume number 194 and a disksubsystem number 192 of the VOLSER thus set. Then, the obtained volumenumber 194 and the disk subsystem number 192 are respectively set in theprimary volume number 1671 and the primary disk subsystem number 1672.

Then, the data duplication-controlling portion 11 obtains from the copygroup definition data 16 which is a target of processing, a secondaryvolume data center identifier 165 as a copy destination (S902). Next,the data duplication-controlling portion 11 reads out the disk subsystemconfiguration data 19, and obtains the disk subsystem data 192 to 195held by the data center identifier 191 identical to the data centeridentifier 165 thus obtained (S903). Then, the data duplicationcontrolling portion 11 determines whether or not there is a disksubsystem available for being selected as a copy destination, based onthe obtained disk subsystem information 192 to 195 (S904).

In other words, the data duplication-controlling portion 11 firstlyextracts a disk subsystem which has an unused volume. It is determinedwhether or not there is an unused volume in a disk subsystem, byreferring to the value of the unused volume number 193 of the disksubsystem configuration data 19. The disk subsystem having the valueother than “0” is extracted, since it indicates that there is an unusedvolume. If the unused volume number 193 of a disk subsystem is “0”, itindicates that the disk subsystem does not include an unused volume, andthus it cannot be selected as a copy destination subsystem.

Then, the data duplication-controlling portion 11 selects a disksubsystem which satisfies a condition described in the selectioncondition 181 of the duplication condition data 18. For example, in theduplication condition data 18 as shown in FIG. 6, if the transfer typeidentifier 162 or the copy group definition data 16 as a processingtarget is synchronous remote copy, any of the constant selectionconditions 183 and 184 is not applicable. Therefore, it is possible toselect a disk subsystem having an unused volume, without beingrestricted by the constant selection conditions 183, 184, which arestored in the duplication condition data 18. On the other hand, if thetransfer type identifier 162 of the copy group definition data 16 as aprocessing target is asynchronous remote copy, both of the constantselection conditions 183 and 184 are applicable. Therefore, a disksubsystem which satisfies those constant selection conditions 183, 184is selected. It is to be noted if there are a plurality or disksubsystem selectable as a copy destination, any one of the disksubsystem numbers is selected, in accordance with a predefined rule,such as selecting a disk subsystem having the smallest disk subsystemnumber 192.

If there is a disk subsystem as a candidate of the copy destination(S904: YES), the data duplication-controlling portion 11 determineswhether or not a secondary volume as a copy destination can he obtainedfrom the pertinent disk subsystem (S905). A method for obtaining thesecondary volume is same as the method for selecting a secondary volumedescribed in the Patent Document 1. In other words, according to theinstruction for selecting a secondary volume from the dataduplication-controlling portion 11, the disk controller 31 selects avolume unused and having a disk volume larger than that of the primaryvolume, and notifies the data duplication-controlling portion 11 of thusselected volume.

If the secondary volume is normally obtained (S905: YES), the dataduplication-controlling portion 11 sets the information of thus obtainedsecondary volume, in the secondary volume information (copy destination)of the pair data reserved in S901 (S906). In other words, the volumenumber 1674 and the dial subsystem number 1675 of the pertinentsecondary volume is set. Then, the data duplication-controlling portion11 issues a pair making setting command for the newly generated pair asthe pair data 167, to the disk subsystem of the primary volume (copysource) and the disk subsystem of the secondary volume (copydestination) (S907). It is to be noted that this pair making settingcommand is same as a pair making command for the “pair making” asdescribed in the Patent Document 1. That is, the pair making commandtriggers off a updating of internal information in the disc subsystemand execution of a copy-making.

Then, the data duplication-controlling portion 11 determines whether ornot the setting command has been successful (S908). If the settingcommand has been successful (S908: YES), the dataduplication-controlling portion 11 determines whether or not thereexists a copy group related with the copy group definition data 16 as aprocessing target (S909). Specifically, the data duplicate-controllingportion 11 refers to the related/non-related flag 166 of the copy groupdefinition data 16, and determines whether or not there is a relatedcopy group.

If there exists a related copy group (S909: YES), it indicates that avolume image set 6 is in process of being generated. Specifically, itindicates a status that even after the pair data 167 is defined betweenthe disk subsystem 30 of the main data center 3 and the disk subsystem40 of the local data center 4, the pair data 167 between the disksubsystem 40 of the local data center 4 and the disk subsystem 50 of theremote data center 5 has not been defined yet. Therefore, it isnecessary to execute a volume addition processing continuously.

If there is a related copy group (S909: YES), the dataduplication-controlling portion 11 refers to the copy group relationdefinition data 17, and obtains a second copy group number 172 having asthe first copy group number 171, the copy group number 161 of thepertinent copy group (S910). Then, the process returns to S901, and thedata duplication-controlling portion 11 carries out the volume additionprocessing again against the copy group having the second copy groupnumber, which is obtained in S910. In this case, the dataduplication-controlling portion 11 sets the volume information of copydestination of the pair data 167 generated in S906, as primary volumeinformation (copy source) of the pair data 167, for which a region isnewly reserved.

Furthermore, if there is not a disk subsystem satisfying the duplicationcondition data 18 and the like (S904: NO), the dataduplication-controlling portion 11 determines whether or not the copygroup as a processing target is a head of the volume image set 6 (S911).In other words, the data duplication-controlling portion 11 determineswhether or not the copy group number 161 of the copy group definitiondata 16 as a processing target is stored in the second copy group number172 of the copy group relation definition data 17. If the copy groupnumber 161 as a processing target is stored in the second copy groupnumber 172, the data duplication-controlling portion 11 determines thatthe pertinent copy group is not a head of the volume image set 6. On theother hand, if the copy group number 161 as a processing target is notstored in the second copy group number 172, the dataduplication-controlling portion 11 determines that the pertinent copygroup is a head of the volume image set 6.

If the copy group as a processing target is a head of the volume imageset 6 (S911: YES), that is, if it is a pair making between the main datacenter 3 and the local data center 4, the data duplication-controllingportion 11 outputs an error in the host computer SVP 20 which is anoutput unit 905 (S914).

On the other hand, if the copy group as a processing target is not ahead of the volume image set 6 (S911: NO), or a secondary volume cannotbe obtained (S905: NO), or a setting command has failed (S908), it isnecessary that the process returns to S901, and the volume additionprocessing (S806) is executed again. Therefore, the dataduplication-controlling portion 11 adds the information which is a causeof error to the duplication condition data 18 (S912). In other words,the data duplication-controlling portion 11 adds the information as tothe disk subsystem in error to the selection condition 181 of theduplication condition data 18, so that the disk subsystem in errorcannot be selected. At that timing, the temporary condition flag 182 isset to “ON”. For example, as shown in FIG. 6, a temporary selectioncondition 185 is added, such as “the disk subsystem number “5” with thedata center identifier being “local” cannot be selected”.

It is noted that when the setting command has failed (S908), it isconceivable that a failure occurs in the disk subsystem that issued acommand. Therefore, the data duplication-controlling portion 11 adds tothe duplication condition data 18, the information of the disk subsystemwhere the failure has occurred, as a temporary selection condition, sothat such subsystem cannot be selected.

Furthermore, if the copy group as a processing target is not a head ofthe volume image 6 (S911: NO), a selection of the disk subsystem in thecopy group at the head of the volume image set 6 causes an error. Theselection of the disk subsystem in the copy group at the head causessuch an error, because of the reasons as the following: As describedabove, in the example of constant conditions 183, 184 of the duplicationcondition data 18 (see FIG. 6), conditions in the case of asynchronoustransfer are described. Therefore, if the head copy group is based onsynchronous transfer, the constant conditions 183, 184 are notapplicable. However, if related copy group is based on asynchronoustransfer, those constant conditions 183, 184 are applicable. Forexample, if a different disk subsystem is selected as a secondary volumein the volume addition processing for the head copy group, the selecteddisk subsystem becomes a primary volume of the related copy group.Therefore, it does not satisfy the constant condition 183.

Then, the data duplication-controlling portion 11 refers to the copygroup relation definition data 17, and obtains a first copy group number171 that has the copy group number 161 of the copy group definition data16 as a processing target, as a second copy group number 172.Subsequently, the data duplication-controlling portion 11 defines thecopy group definition data 16 of thus obtained first copy group numberas a copy group to be processed next. Then, the dataduplication-controlling portion 11 issues to tho disk subsystem, a pairdeleting setting command for deleting the pair making setting commandwhich has been issued against the head copy group in S907 (S913).Furthermore, the data duplication-controlling portion 11 deletes thepair data 167 generated in the volume addition processing in the headcopy group. It is to be noted here that this pair deleting settingcommand is same as the deleting command for “pair deletion” destined inthe Patent Document 1. That is, the internal information of the disksubsystem is updated to render the status as “no pair making”.

Subsequently, the data duplication-controlling portion 11 returns theprocess to S901, and the volume addition processing (S806) is executedagain for the head copy group.

After error information is outputted due to a failure in the volumeaddition processing (S914), or the volume addition processing issuccessful and no other relating copy group exists (S909: NO), the dataduplication controlling portion 11 deletes the temporary selectioncondition 185 with a temporary condition flag 182 “ON”, which has beanadded to the duplication condition data 18 (S915), and the volumeaddition processing is completed.

Next, a flow of the aforementioned volume deletion processing (S808)will be explained following the flowchart as shown in FIG. 10.

The data duplication-controlling portion 11 determines whether or notthe copy group decided to be deleted in S808 has a related copy group,by referring to the related/non-related flag 166 (S1001). Then, if ithas a related copy group (S1001: YES), the data duplication-controllingportion 11 obtains a copy group number of the related copy group andpair data 167 as a target of the deletion processing (S1002). In otherwords, the data duplication-controlling portion 11 refers to the copygroup relation definition data 17, and obtains a second copy groupnumber which has the copy group number as a processing target, as thefirst copy group number 171. Furthermore, the data duplicationcontrolling portion 11 obtains a secondary volume of the volume (primaryvolume) to be deleted. Then, the data duplication-controlling portion 11refers to the copy group definition data 16 of thus obtained copy groupnumber, and obtains pair data 167 in which the secondary volume (copydestination) of the primary volume (copy source) to be deleted isdefined as a primary volume (copy source).

Then, the data duplication-controlling portion 11 returns the process toS1001, and determines again whether or not the copy group decided to bedeleted has a related copy group (S1001). If it does not have a relatedcopy group (S1001: NO), the data duplication-controlling portion 11issues to the disk subsystem, a pair deleting setting command to deletethe pair of the pair data 167 including a volume to be deleted (or asecondary volume (copy destination) of the volume to be deleted)(S1003).

Then, the data duplication-controlling portion 11 determines whether ornot the pair deleting setting command has been successful (S1004). Whenthe pair deleting setting command has been successful (S1004: YES), thedata duplication-controlling portion 11 deletes from the copy groupdefinition data 16, the pair data 167 as to which the deleting settingcommand has been issued (S1005). Subsequently, the dataduplication-controlling portion 11 determines whether or not there is acopy group to be deleted next (S1006). In other words, when the dataduplication-controlling portion 11 obtains a related copy group inS1002, it stores a copy group number and pair data to be deleted at thepresent timing, in the memory 902 or in the external storage unit 903.Then, the data duplication controlling portion 11 determines whether ornot there is a copy group to be deleted next by use of those informationitems.

If there is a copy group to be deleted next (S1006: YES), the dataduplication-controlling portion 11 obtains the copy group number and thepair data 167 stored in S1002 (S1007), and it returns the process toS1003 and issues a pair deleting setting command. Alternatively, ifthere is no copy group to be deleted (S1006: NO), the volume deletionprocessing is completed. Furthermore, if the pair deleting settingcommand failed (S1004: NO), the data duplication-controlling portion 11outputs an error to the host computer SVP 20 which is an output unit905, and ends the volume deleting processing.

In the description above, one embodiment of the present invention hasbeen explained.

In the present embodiment, if there is a change in volume group managedby the host computer 10, it is possible to carry out immediately thedate duplication processing against thus changed volume. Accordingly,data consistency is secured, whereby consistency of the data within thevolume groups can be maintained.

Furthermore, even if there are multiple disk subsystems, an appropriatesubsystem can be selected as a copy destination for duplicating data.

In addition, even if the system configuration is complicated due to aplurality of data copy destinations, such as the main data center 3, thelocal data center 4, and the remote center 5, it is possible to selectan appropriate disk system as a copy destination for data duplication,by adding a temporary selection condition to the duplication conditiondata 18, whereby the data duplication processing can be easilyimplemented.

It is to be noted that the present invention is not limited to the aboveembodiment, and various modifications may be possible without departingfrom the scope of the present invention.

For example, in the embodiment above, there is explained a case thatonly one volume group is managed by the volume-managing portion 12, andthe data within the volume group is duplicated to the main data center3, the local data center 4 and the remote data center 5. However, it ispossible to consider a case where multiple volume groups exist. In thiscase, multiple copy group relation definition data items 17 aregenerated, the number of which is equal to that of the existing volumegroups.

In the embodiment above, it is defined that the disk subsystemconfiguration data 19 is previously stored in the data duplicationconfiguration-storing portion 13, prior to executing the dataduplication processing. However, it is possible to configure such thateach disk subsystem obtains the disk subsystem configuration data 19.That is, the data duplication-controlling portion 11 issues a pairmaking command between the local data center 4 and the remote datacenter 5 via the main data center 3. In such a manner, it is possiblefor the data duplication-controlling portion 11 to obtain the disksubsystem configuration data of the local data center 4 and the remotedata center 5 via the main data center 3. Alternatively, without throughthe main data center 3, the data duplication-controlling portion 11 maydirectly obtain the disk subsystem configuration data by setting acommunication path and the like from the host computer 10 to the disksubsystem SVP 43, 53 of the data centers 4 and 5, respectively.

Further in the computer system of the embodiment above, it is possibleto configure such that a management computer for managing the overallcomputer system is provided, in addition to the host computer system 1.FIG. 11 is a schematic diagram showing a computer system to whichprovides a management computer.

For the management computer, a general-purpose computer system as shownin FIG. 2 can be used, and it is connected to the computer system of theabove embodiment via the network. In this case, the management computercarries out a part of or all of the processes executed by the hostcomputer system 1 of the above embodiment. For example, in the aboveembodiment, a user inputs the duplication condition data 18 from theinput unit 904 of the host computer system 1. However, it is alsopossible to configure such that the user inputs the duplicationcondition data 18 from the input unit of the management computer. Then,the management computer notifies the host computer system 1 of theduplication condition data 18 thus inputted.

Furthermore, the management computer may carry out the data duplicationprocessing as shown in FIG. 8, on behalf of the host computer system 1.In other words, the management computer obtains information (copy groupdefinition data 16, disk subsystem configuration data 19 and the like)stored in the data duplication configuration-storing portion 13 of thehost computer 1, via the network. Then, the management computer executesthe data duplication processing based on the data stored in the dataduplication configuration-storing portion 13, and transmits to the hostcomputer system 1, the data of the data duplicationconfiguration-storing portion 13 that has been updated by theprocessing. Then, the host computer system 1 receives the updatedinformation of the data duplication configuration-storing portion 13,and transmits a command and the like, to the disk subsystems 30, 40, 50and so on, to instruct a generation of a copy group in accordance withthe contents of update.

Furthermore, it is also possible to configure such that the managementcomputer may receive from a user a volume addition instruction againstthe volume-managing portion 12 of the host computer system 1. In thiscase, the management computer can detect an addition of volume inadvance. Therefore, the management computer carries out the volumeaddition processing of the aforementioned data duplication processing(see FIG. 9), by use of the copy group definition data 16 and the likeobtained from the host computer system 1. Then, the management computertransmits the result of the processing to the host computer 1 togetherwith an instruction for volume addition. Accordingly, it is notnecessary for the host computer 1 to search for a presence ornon-presence of volume addition, and a processing in the entire systembecomes simple.

Furthermore, the management computer may control the execution ofstarting or stopping operations by the data duplication-controllingportion 11 of the host computer system 1.

It is further possible for the host computer system 1 or the managementcomputer to have a graphical user interface (GUI) to simplify datainputting by a user. FIG. 12 is a diagram showing an example of GUI towhich the host computer system 1 or the management computer has. Forexample, this GUI displays on the output unit 905 the disc subsystems30, 40 and 50 connected with the host computer system 1, following theconnection topology. Then, the GUI receives a user instruction, createsinformation to generate a copy group in any of the instructed disksubsystems 30, 40, and 50, and makes an instruction to the dataduplication-controlling portion 11. Furthermore, by use of the GUI, thecopy group information between the disk subsystems may be visuallydisplayed on the output unit 905. Accordingly, the user can selectindividual copy groups by way of the GUI interface, whereby it is easyto instruct the host computer system 1 to generate the volume image set6.

1. A data duplication method which duplicates data being stored in astorage subsystem connected to a computer, wherein, said computerincludes a processor unit and a storing unit, and said processor unitcomprises, an identification information reading step which reads outfrom a storing unit an identification information list in whichidentification information of each of a plurality of storage mediaincluded in the storage subsystem is stored, a first reading step whichreads out from the storing unit, the first duplication definitioninformation which stores the identification information with respect toeach of the plurality of storage media, and identification informationof a copy destination storage medium of each of the plurality of storagemedia, a first comparing step which compares the identificationinformation list read out in the identification information readingstep, and the first duplication definition information read out in thefirst reading step, an addition step in which if there existsidentification information that is stored in the identificationinformation list but not stored in the first duplication definitioninformation in the first comparing step, a copy destination recordingmedium of the storage medium having the identification information isselected according to a predetermined selection condition, theidentification information and the identification information of thecopy destination storage medium thus selected are added to the firstduplication definition information, and data in the storage mediumhaving the identification information is copied to the copy destinationstorage medium thus selected, and a deletion step in which if thereexists identification information that is not stored in theidentification information list but is stored in the first duplicationdefinition information in the first comparing step, the identificationinformation and the identification information of the storage medium,which is a copy destination of the storage medium having theidentification information, are deleted from the first duplicationdefinition information, and copying the data of the storage mediumhaving the identification information is stopped.
 2. A data duplicationmethod according to claim 1, wherein, there exist a plurality of saidstorage subsystems connected to the computer, and a plurality of saidstorage subsystems which include said copy destination storage medium.3. A data duplication method according to claim 1, wherein, a secondreading step which reads out from said storing unit, the secondduplication definition information which stores identificationinformation with respect to each of said plurality of storage media as acopy destination, and identification information of a storage medium asa further copy destination of each of said storage media, a secondcomparing stop which compares the first duplication definitioninformation read out in said first reading step, and the secondduplication definition information read out in said second reading step,an addition step in which if there exists identification informationthat is stored in the first duplication definition information but notstored in the second duplication definition information in the secondcomparing step, a further copy destination recording medium of thestorage medium having the identification information is selectedaccording to a predetermined selection condition, the identificationinformation and the identification information of the further copydestination storage medium thus selected are added to the secondduplication definition information, and data in the storage mediumhaving the identification information is copied to the further copydestination storage medium thus selected, and a deletion step in whichif there exists identification information that is not stored in thefirst duplication definition information but is stored in the secondduplication definition information in the second comparing step, theidentification information and the identification information of thestorage medium, which is a further copy destination of the storagemedium having tho identification information, are deleted from thesecond duplication definition information, and copying the data of thestorage medium having the identification information is stopped.
 4. Adata duplication method according to claim 1, wherein, said selectioncondition includes information which has caused an error occurred insaid addition step.
 5. A program which duplicates data being stored in astorage subsystem connected to a computer, wherein, said computerincludes a processor unit and a storing unit, and said program allowsthe processor unit to execute, an identification information readingstep which reads out from a storing unit an identification informationlist which stores identification information of each of a plurality ofstorage media included in the storage subsystem, a definitioninformation reading step which leads out from the storing unit, theduplication definition information which stores the identificationinformation with respect to each of the plurality of storage media, andidentification information of a copy destination storage medium of eachof the plurality of storage media, a comparing step which compares theidentification information list read out in the identificationinformation reading step, and the duplication definition informationread out in the duplication definition reading step, an addition step inwhich if there exists identification information that is stored in theidentification information list but not stored in the duplicationdefinition information in the comparing step, a copy destinationrecording medium of the storage medium having the identificationinformation is selected according to a predetermined selectioncondition, the identification information and the identificationinformation of the copy destination storage medium thus selected areadded to the duplication definition information, and data in the storagemedium having the identification information is copied to the copydestination storage medium thus selected, and a deletion step in whichif there exists identification information that is not stored in theidentification information list but is stored in the duplicationdefinition information in the comparing step, the identificationinformation and the identification information of the storage medium,which is a copy destination of the storage medium having theidentification information, are deleted from the duplication definitioninformation, and copying the data of the storage medium having theidentification information is stopped.
 6. A computer which duplicatesdata stored in a storage subsystem, comprising, a first storing meanswhich stores an identification information list in which identificationinformation of each or a plurality of storage media included in saidstorage subsystem is stored, a second storing means which storesduplication definition information including identification informationwith respect to each of said plurality of storage media, andidentification information of a copy destination storage medium of eachor said storage media, and a comparing means which compares theidentification information list stored in said first storing means, andthe duplication definition information stored in said second storingmeans, wherein, if the identification information is stored in saididentification information list but not stored in said duplicationdefinition information, said comparing means selects according to apredefined selection condition, a copy destination storage medium of thestorage medium having the identification information, adds to saidduplication definition information, the identification information andthe identification information of said copy destination storage mediumthus selected, and copies data in the storage medium having theidentification information to said copy destination storage medium thusselected, and if there exists identification information not stored insaid identification information list, but stored in said duplicationdefinition information, said comparing means deletes from saidduplication definition information, the identification information andthe identification information of the copy destination storage medium ofthe storage medium having the identification information, and stopscopying of data in the storage medium having the identificationinformation.